home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 1.6 / Buddy API Docs.swf / texts / 1530.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  4.7 KB  |  179 lines

  1. 127
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. CopyXFiles 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Windows and Macintosh
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baCopyXFiles copies multiple files from one folder to another folder, with wildcard 
  20. --- RECORDSEPARATOR ---
  21. matching.
  22. --- RECORDSEPARATOR ---
  23.  
  24. --- RECORDSEPARATOR ---
  25. Usage:
  26. --- RECORDSEPARATOR ---
  27.  
  28. --- RECORDSEPARATOR ---
  29. Result = baCopyXFiles( SourceDir , DestDir , FileSpec , Overwrite )
  30. --- RECORDSEPARATOR ---
  31.  
  32. --- RECORDSEPARATOR ---
  33. Arguments:
  34. --- RECORDSEPARATOR ---
  35.  
  36. --- RECORDSEPARATOR ---
  37. String, String, String, String. 
  38. --- RECORDSEPARATOR ---
  39. SourceDir is the folder to copy from. 
  40. --- RECORDSEPARATOR ---
  41. DestDir is the folder to copy to. 
  42. --- RECORDSEPARATOR ---
  43. FileSpec determines what files are copied. 
  44. --- RECORDSEPARATOR ---
  45. Overwrite determines how the copy is done. Can be: 
  46. --- RECORDSEPARATOR ---
  47. "Always" 
  48. --- RECORDSEPARATOR ---
  49. always copies the file 
  50. --- RECORDSEPARATOR ---
  51. "IfNewer" 
  52. --- RECORDSEPARATOR ---
  53. copies the file if SourceFile is newer than DestFile 
  54. --- RECORDSEPARATOR ---
  55. "IfNotExist" 
  56. --- RECORDSEPARATOR ---
  57. copies only if DestFile does not already exist
  58. --- RECORDSEPARATOR ---
  59.  
  60. --- RECORDSEPARATOR ---
  61. Returns:
  62. --- RECORDSEPARATOR ---
  63.  
  64. --- RECORDSEPARATOR ---
  65. Integer. 
  66. --- RECORDSEPARATOR ---
  67. Returns 0 if 
  68. --- RECORDSEPARATOR ---
  69. all the files were copied successfully, otherwise one of these: 
  70. --- RECORDSEPARATOR ---
  71. --- RECORDSEPARATOR ---
  72. Invalid SourceDir name 
  73. --- RECORDSEPARATOR ---
  74. --- RECORDSEPARATOR ---
  75. Invalid DestDir file name 
  76. --- RECORDSEPARATOR ---
  77. --- RECORDSEPARATOR ---
  78. Error reading a Source file 
  79. --- RECORDSEPARATOR ---
  80. --- RECORDSEPARATOR ---
  81. Error writing a Dest file 
  82. --- RECORDSEPARATOR ---
  83. --- RECORDSEPARATOR ---
  84. Couldn't create directory for Dest files 
  85. --- RECORDSEPARATOR ---
  86. --- RECORDSEPARATOR ---
  87. Dest file exists 
  88. --- RECORDSEPARATOR ---
  89. --- RECORDSEPARATOR ---
  90. Dest file is newer that Source file 
  91. --- RECORDSEPARATOR ---
  92. --- RECORDSEPARATOR ---
  93. No files matched the specified wildcard
  94. --- RECORDSEPARATOR ---
  95.  
  96. --- RECORDSEPARATOR ---
  97. Examples:
  98. --- RECORDSEPARATOR ---
  99.  
  100. --- RECORDSEPARATOR ---
  101. Director: 
  102. --- RECORDSEPARATOR ---
  103. set OK = baCopyXFiles( "c:\data" , "d:\backup" , "*.dat " , "IfNewer" ) 
  104. --- RECORDSEPARATOR ---
  105. Authorware: 
  106. --- RECORDSEPARATOR ---
  107. OK := baCopyXFiles( "c:\\data" , "d:\\backup" , "*.dat" , "IfNewer" )
  108. --- RECORDSEPARATOR ---
  109.  
  110. --- RECORDSEPARATOR ---
  111. Notes:
  112. --- RECORDSEPARATOR ---
  113.  
  114. --- RECORDSEPARATOR ---
  115. By default, this function will not overwrite an existing file if that file is marked as 
  116. --- RECORDSEPARATOR ---
  117. read-only. However, by adding "+"  to the "Always" and "IfNewer" options ( eg 
  118. --- RECORDSEPARATOR ---
  119. "Always+" or "IfNewer+"), the files will be overwritten if they are read-only. 
  120. --- RECORDSEPARATOR ---
  121. The return value will not be 0 if any file is not copied. For example, if you specify 
  122. --- RECORDSEPARATOR ---
  123. baCopyXFiles( "c:\data" , "d:\backup" , "*.*" , "IfNewer" ) 
  124. --- RECORDSEPARATOR ---
  125. and any of the files in c:\data are newer than the ones in d:\backup, the return 
  126. --- RECORDSEPARATOR ---
  127. result will be 7 (Dest file is newer than Source). A result of 0 will be returned only if 
  128. --- RECORDSEPARATOR ---
  129. none of the files  in c:\data is newer than d:\backup. 
  130. --- RECORDSEPARATOR ---
  131. On
  132. --- RECORDSEPARATOR ---
  133.  Windows
  134. --- RECORDSEPARATOR ---
  135. , the FileSpec argument follows normal DOS wildcard rules. A * 
  136. --- RECORDSEPARATOR ---
  137. means match any character in the file name.  So *.* copies all files; *.bmp copies 
  138. --- RECORDSEPARATOR ---
  139. all files with a .bmp extension; T*.* copies all files starting with the letter T. 
  140. --- RECORDSEPARATOR ---
  141. On
  142. --- RECORDSEPARATOR ---
  143.  Macintosh
  144. --- RECORDSEPARATOR ---
  145. , the Filespec is the four character type code eg "TEXT". Only one 
  146. --- RECORDSEPARATOR ---
  147. type can be specified. Use an empty string or "*.*" to match all files. 
  148. --- RECORDSEPARATOR ---
  149. A return value of 6 (Dest file exists) can only be returned when Overwrite is 
  150. --- RECORDSEPARATOR ---
  151. "IfNotExist". 
  152. --- RECORDSEPARATOR ---
  153. A return value of 7 (Dest file is newer than Source file) can only be returned when 
  154. --- RECORDSEPARATOR ---
  155. Overwrite is "IfNewer". The other return values can be returned for all Overwrite 
  156. --- RECORDSEPARATOR ---
  157. options. 
  158. --- RECORDSEPARATOR ---
  159. The "IfNewer" option operates as follows: if both files have internal version 
  160. --- RECORDSEPARATOR ---
  161. numbers, then these numbers are used for comparison, otherwise the dates of the 
  162. --- RECORDSEPARATOR ---
  163. two files are used for comparison.
  164. --- RECORDSEPARATOR ---
  165.  
  166. --- RECORDSEPARATOR ---
  167. See also:
  168. --- RECORDSEPARATOR ---
  169.  
  170. --- RECORDSEPARATOR ---
  171. baCopyFile